package com.example.adapter.demo.login.v1.adapters;

import com.example.adapter.demo.login.v1.Member;
import com.example.adapter.demo.login.v1.ResultMsg;

/**
 * 微信登录
 */
public class LoginForWechatAdapter implements LoginAdapter {


    @Override
    public boolean support(Object loginAdapter) {
        return loginAdapter instanceof LoginForWechatAdapter;
    }

    @Override
    public ResultMsg login(String id) {
        Member member = new Member();
        member.setWechat(id);
        ResultMsg resultMsg = new ResultMsg(200, "wechat登录成功", member);
        return resultMsg;
    }
}
